package com.sright.bcard.content.dal.dao.impl;

import com.sright.bcard.common.service.share.base.dao.BaseDAOImpl;
import com.sright.bcard.common.service.share.base.dao.BaseMapper;
import com.sright.bcard.content.dal.dao.UserTagsDAO;
import com.sright.bcard.content.dal.entity.UserTagsDO;
import com.sright.bcard.content.dal.mapper.UserTagsDOMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class UserTagsDAOImpl extends BaseDAOImpl<UserTagsDO> implements UserTagsDAO {

    @Resource
    private UserTagsDOMapper userTagsDOMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return userTagsDOMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int deleteByTagId(Long tagId) {
        return userTagsDOMapper.deleteByTagId(tagId);
    }

    @Override
    public int deleteByUserId(Long analysisId) {
        return userTagsDOMapper.deleteByUserId(analysisId);
    }

    @Override
    public List<UserTagsDO> selectByEnterpriseIdAndUserId(Long enterpriseId, Long analysisId) {
        return userTagsDOMapper.selectByEnterpriseIdAndUserId(enterpriseId, analysisId);
    }

    @Override
    public List<UserTagsDO> selectByAnalysisId(Long analysisId) {
        return userTagsDOMapper.selectByAnalysisId(analysisId);
    }

    @Override
    protected BaseMapper<UserTagsDO> getObjMapper() {
        return userTagsDOMapper;
    }
}
